# _*_ coding:utf-8 _*_

"""
# @Time　 : 2021/12/28 21:31
# @Author : king
# @File　 : allure_step.py
# @project: ApiPytestFramework
# @QQ     : 772084279
# @Email  : 772084279@qq.com
# @blog   : https://ceshizhilu.blog.csdn.net/
"""
import json
import allure


def allure_title(title: str) -> None:
    """allure中显示的用例标题"""
    allure.dynamic.title(title)


def allure_step(step_title: str, content: str) -> None:
    """
    :param step_title: 步骤及附件名称
    :param content: 附件内容
    """
    with allure.step(step_title):
        allure.attach(json.dumps(content, ensure_ascii=False, indent=4), step_title, allure.attachment_type.TEXT)